package com.hefeng.example.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hefeng.example.domain.AppUser;
import com.hefeng.example.mapper.AppUserMapper;
import com.hefeng.example.service.AppUserService;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;

@Service
@AllArgsConstructor
public class AppUserServiceImpl extends ServiceImpl<AppUserMapper, AppUser> implements AppUserService {

    @Lazy
    @Autowired
    private AppUserMapper appUserMapper;

    /**
     * 获取用户个人信息
     *
     * @param userId
     * @return
     */
    @Override
    public AppUser selectById(String userId) {
        return appUserMapper.selectByUserIdAppUser(userId);
    }

    @Override
    public int addUser(AppUser appUser) {
        return appUserMapper.insert(appUser);
    }


}
